<!DOCTYPE html>
<html>
<head>
	<title>老师管理</title>
	<meta charset="UTF-8">
	<meta name="renderer" content="webkit" />
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<!-- layui -->
	<link rel="stylesheet" type="text/css" href="../lib/layui/css/layui.css">
	<!-- Custom -->
	<link rel="stylesheet" type="text/css" href="../lib/css/reset.css" />
	<link rel="stylesheet" type="text/css" href="../css/teacher.css" />
</head>
<body>
	<!-- wrap -->
	<div class="wrap">
		<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
		<ul class="layui-tab-title">
		    <li class="layui-this">老师管理</li>
		</ul>
		<div class="layui-tab-content">
			<div class="layui-tab-item layui-show">
				<!--<button class="layui-btn addTeacherBtn">新增</button>-->
				<table class="layui-table">
					<colgroup>
							<col width="100">
							<col width="100">
							<col width="100">
							<col width="250">
							<col width="350">
							<col width="200">
							<col width="150">
					</colgroup>
					<thead>
							<tr>
								<th>姓名</th>
								<th>性别</th>
								<th>微信号</th>
								<th>职称</th>
								<th>介绍</th>
								<th>二维码</th>
								<th>操作</th>
							</tr>
					</thead>
					<tbody class="showTeacherList"></tbody>
				</table>
			</div>
		</div>
	</div>
	<div class="layui-form editTeacherTpl">
		<div class="left fl">
			<div class="layui-form-item">
				<label class="layui-form-label">姓名</label>
				<div class="layui-input-inline">
					<input type="text" placeholder="请输入姓名" class="layui-input editTeacherName">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">微信号</label>
				<div class="layui-input-inline">
					<input type="text" placeholder="请输入微信号" class="layui-input editTeacherAge">
				</div>
			</div>
		</div>
		<div class="right fl">
			<div class="layui-form-item">
				<label class="layui-form-label">性别</label>
				<div class="layui-input-inline">
					<input type="text" placeholder="请输入性别" class="layui-input editTeacherGender">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">职称</label>
				<div class="layui-input-inline">
					<input type="text" placeholder="请输入职称" class="layui-input editTeacherTitle">
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">介绍</label>
			<div class="layui-input-block" style="width: 530px;">
				<textarea placeholder="请输入介绍" class="layui-textarea editTeacherComment"></textarea>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">二维码</label>
			<div class="layui-input-block">
				<div class="upTeacherImg">
					<img src="" alt="" class="editTeacherImg" />
				</div>
				<div class="upImg fl">
					<input type="file" class="upImgFile editUpImgFile" />
					<button class="layui-btn upImgBtn"><i class="layui-icon"></i> 上传</button>
				</div>
				<div class="layui-form-mid layui-word-aux">尺寸：100*100像素</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-input-block">
				<button class="layui-btn saveEditTeacher">保存</button>
			</div>
		</div>
	</div>
	<script type="text/javascript" src="../lib/js/jquery-1.12.2.min.js"></script>
	<script type="text/javascript" src="../lib/js/json2.js"></script>
	<script type="text/javascript" src="../lib/js/system-config.js"></script>
	<script type="text/javascript" src="../lib/layui/layui.js"></script>
	<!-- 引入layer,element,form模块 -->
	<script type="text/javascript">
		layui.use(['layer','element','form'], function(){
  			var layer = layui.layer,
  			      element = layui.element(),
  			      form = layui.form();
		});
	</script>
	<script type="text/javascript" src="../lib/js/jsrender-min.js"></script>
	<!-- 定义幻灯片模板 -->
	<script type="text/x-jsrender" id="teacherTpl">
		<tr uid="{{:id}}">
			<td>
				<span class="showTeacherName">{{:name}}</span>
			</td>
			<td>
				<span class="showTeacherGender">{{:gender}}</span>
			</td>
			<td>
				<span class="showTeacherAge">{{:age}}</span>
			</td>
			<td>
				<span class="showTeacherTitle">{{:title}}</span>
			</td>
			<td>
				<span class="showTeacherComment">{{:comment}}</span>
			</td>
			<td>
				<img src="{{:api_host}}{{:img}}" data-src="{{:img}}" alt="" class="showTeacherImg" />
			</td>
			<td>
				<button class="layui-btn layui-btn-small editTeacherBtn"><i class="layui-icon"></i></button>
				<!--<button class="layui-btn layui-btn-small delTeacherBtn"><i class="layui-icon"></i></button>-->
			</td>
		</tr>
	</script>
	<script type="text/javascript" src="../lib/js/easy.ajax.js"></script>
	<script type="text/javascript" src="../js/teacher.js"></script>
</body>
</html>